package com.bao.work;

/**
 * @author baoye
 * @date 2024-08-07/20:50
 */
public class Thread02 {
    public static void main(String[] args) {
        Thread thread=new Thread(new Run(),"紫禁城");
        thread.start();
        for (int i=0;i<10;i++){
            System.out.println("我是"+Thread.currentThread().getName());
        }
    }
}
class Run implements Runnable{

    @Override
    public void run() {
        for (int i=0;i<10;i++){
            System.out.println("我是"+Thread.currentThread().getName());
        }
    }
}
